package com.mud.mudcommune.adapter;

import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.facebook.drawee.view.SimpleDraweeView;
import com.mud.mudcommune.R;

import java.util.List;

/**
 * Created by zhoujin on 2016/12/11.
 */

public class EvaluateAdapter extends MyBaseAdapter {
    public EvaluateAdapter(@NonNull List list) {
        super(list);
    }

    @Override
    public View getView(int position, View view, ViewGroup viewGroup) {
        ViewHolder viewHolder;
        if (view == null) {
            viewHolder = new ViewHolder();
            view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.evaluate_item, null);
            viewHolder.headPic = (SimpleDraweeView) view.findViewById(R.id.user_headPic);
            viewHolder.name = (TextView) view.findViewById(R.id.user_name);
            viewHolder.desc = (TextView) view.findViewById(R.id.details_desc);
            viewHolder.time = (TextView) view.findViewById(R.id.details_time);
            view.setTag(viewHolder);
        } else {
            viewHolder = (ViewHolder) view.getTag();
        }
        viewHolder.name.setText("王志军");
        viewHolder.desc.setText("泥巴公社成立于2012年底，总部位于湖南省会长沙，泥巴公社根植于老房改造与翻新，精装房升级，局部改造和新房装修领域，它是湖南省第一家为精装房提供后期配饰服务的公司，同时也是湖南首家提供细致、专业的售后维护服务公司。");
        viewHolder.time.setText("2016-08-26 18：25：43");
        return view;
    }

    static class ViewHolder {
        SimpleDraweeView headPic;
        TextView name, desc, time;
    }
}
